package com.heima.article.feign;

import com.heima.article.dto.EntryAndTypeDto;
import com.heima.article.dto.EntryArticleDto;
import com.heima.article.entity.ApBehaviorEntry;
import com.heima.article.entity.ApFollowBehavior;
import com.heima.article.entity.ApLikesBehavior;
import com.heima.article.entity.ApUnlikesBehavior;
import com.heima.behavior.dto.EntryDto;
import com.heima.common.dto.ResponseResult;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.websocket.server.PathParam;

/**
 * <p>
 * APP行为实体表,一个行为实体可能是用户或者设备，或者其它 前端控制器
 * </p>
 *
 * @author mcm
 * @since 2022-01-17
 */
@FeignClient(value = "leadnews-behavior")
public interface ApBehaviorEntryFeign {

    @PostMapping("/api/v1/behavior_entry/")
    public ApBehaviorEntry findEntry(@RequestBody EntryAndTypeDto dto);

    /*@GetMapping("/api/v1/likes_behavior/getIsLike")
    public ApLikesBehavior getIsLike(@PathParam("entryId") Long entryId, @PathParam("articleId") Long articleId);

    @GetMapping("/api/v1/likes_behavior/getUnLike")
    public ApUnlikesBehavior getUnLike(@PathParam("entryId") Long entryId, @PathParam("articleId") Long articleId);

    @GetMapping("/api/v1/likes_behavior/getIsFollow")
    public ApFollowBehavior getIsFollow(@PathParam("entryId") Long entryId, @PathParam("articleId") Long followId);*/

    @PostMapping("/api/v1/likes_behavior/getIsLike")
    public ApLikesBehavior getIsLike(@RequestBody EntryArticleDto dto);

    @PostMapping("/api/v1/likes_behavior/getUnLike")
    public ApUnlikesBehavior getUnLike(@RequestBody EntryArticleDto dto);

    @PostMapping("/api/v1/likes_behavior/getIsFollow")
    public ApFollowBehavior getIsFollow(@RequestBody EntryArticleDto dto);
}
